<include file="Public/header" title="登陆"/>
    <article class="load">
        <img src="__PUBLIC__/home/images/logo.png" />
        <div class="data">
            <form id="dataForm">
                <input type="number" name="info[username]" oninput="if(value.length>11)value=value.slice(0,11)" placeholder="请输入手机号"/>
                <input type="password" name="info[password]" placeholder="请输入登录密码"/>
                <div class="code flex-justify">
                    <input type="text" name="yzcode" placeholder="请输入图形验证码">
                    <img onclick="this.src='{:U('Common/code')}?t='+Math.random()" style="width:32%;height:0.78rem;" src="{:U('Common/code')}" />
                    <!-- <div class="clearfix" ><img name="yzcode" src="{:U('Common/code')}" /></div>
                     -->
                </div>
                <a href="javascript:void(0)" id="saveBtn" >登录</a>
            </form>
            <div class="load-foot">
                <a href="{:U('Login/resetPwd')}">忘记密码</a>
                <a href="{:U('Login/register')}">用户注册</a>
            </div>
        </div>
   </article>
<script type="text/javascript">
$(function(){
	$('#saveBtn').click(function(){
		$.post(
			"{:U('Login/doLogin')}",
			$('#dataForm').serializeArray(),
			function(data){
				if(data.status == '1'){
					layer.msg(data.info);
					setTimeout("location.href='"+data.url+"'",1000);
				}else{
					layer.msg(data.info);
				}
			}
		)
	})
})
</script>
<include file="Public/footer"/>


